<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class ProjectValidate extends Validate
{
    protected $rule = [
        'name'        => 'require|max:100',
        'description' => 'require|max:1000',
    ];

    protected $message = [
        'name.require'        => '项目名称不能为空',
        'name.max'            => '项目名称不能超过100字',
        'description.require' => '项目描述不能为空',
        'description.max'     => '项目描述不能超过1000字',
    ];

    protected $scene = [
        'create' => ['name', 'description'],
    ];
}
